<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="androidpublisher_v3.html">Google Play Android Developer API</a> . <a href="androidpublisher_v3.orders.html">orders</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#batchget">batchget(packageName, orderIds=None, x__xgafv=None)</a></code></p>
<p class="firstline">Get order details for a list of orders.</p>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#get">get(packageName, orderId, x__xgafv=None)</a></code></p>
<p class="firstline">Get order details for a single order.</p>
<p class="toc_element">
  <code><a href="#refund">refund(packageName, orderId, revoke=None, x__xgafv=None)</a></code></p>
<p class="firstline">Refunds a user's subscription or in-app purchase order. Orders older than 3 years cannot be refunded.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="batchget">batchget(packageName, orderIds=None, x__xgafv=None)</code>
  <pre>Get order details for a list of orders.

Args:
  packageName: string, Required. The package name of the application for which this subscription or in-app item was purchased (for example, &#x27;com.some.thing&#x27;). (required)
  orderIds: string, Required. The list of order IDs to retrieve order details for. There must be between 1 and 1000 (inclusive) order IDs per request. If any order ID is not found or does not match the provided package, the entire request will fail with an error. The order IDs must be distinct. (repeated)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for the orders.batchGet API.
  &quot;orders&quot;: [ # Details for the requested order IDs.
    { # The Order resource encapsulates comprehensive information about a transaction made on Google Play. It includes a variety of attributes that provide details about the order itself, the products purchased, and the history of events related to the order. The Orders APIs provide real-time access to your order data within the Google Play ecosystem. You can retrieve detailed information and metadata for both one-time and recurring orders, including transaction details like charges, taxes, and refunds, as well as metadata such as pricing phases for subscriptions. The Orders APIs let you automate tasks related to order management, reducing the need for manual checks via the Play Developer Console. The following are some of the use cases for this API: + Real-time order data retrieval - Get order details and metadata immediately after a purchase using an order ID. + Order update synchronization - Periodically sync order updates to maintain an up-to-date record of order information. Note: + The Orders API calls count towards your Play Developer API quota, which defaults to 200K daily, and may be insufficient to sync extensive order histories. + A maximum of 1000 orders can be retrieved per call. Using larger page sizes is recommended to minimize quota usage. Check your quota in the Cloud Console and request more if required.
      &quot;buyerAddress&quot;: { # Address information for the customer, for use in tax computation. # Address information for the customer, for use in tax computation. When Google is the Merchant of Record for the order, only country is shown.
        &quot;buyerCountry&quot;: &quot;A String&quot;, # Two letter country code based on ISO-3166-1 Alpha-2 (UN country codes).
        &quot;buyerPostcode&quot;: &quot;A String&quot;, # Postal code of an address. When Google is the Merchant of Record for the order, this information is not included.
        &quot;buyerState&quot;: &quot;A String&quot;, # Top-level administrative subdivision of the buyer address country. When Google is the Merchant of Record for the order, this information is not included.
      },
      &quot;createTime&quot;: &quot;A String&quot;, # The time when the order was created.
      &quot;developerRevenueInBuyerCurrency&quot;: { # Represents an amount of money with its currency type. # Your revenue for this order in the buyer&#x27;s currency, including deductions of partial refunds, taxes and fees. Google deducts standard transaction and third party fees from each sale, including VAT in some regions.
        &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
        &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
        &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
      },
      &quot;lastEventTime&quot;: &quot;A String&quot;, # The time of the last event that occurred on the order.
      &quot;lineItems&quot;: [ # The individual line items making up this order.
        { # Details of a line item.
          &quot;listingPrice&quot;: { # Represents an amount of money with its currency type. # Item&#x27;s listed price on Play Store, this may or may not include tax. Excludes any discounts or promotions.
            &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
            &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
            &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
          },
          &quot;oneTimePurchaseDetails&quot;: { # Details of a one-time purchase. # Details of a one-time purchase.
            &quot;offerId&quot;: &quot;A String&quot;, # The offer ID of the one-time purchase offer.
            &quot;preorderDetails&quot;: { # Details of a pre-order purchase. # The details of a pre-order purchase. Only set if it is a pre-order purchase. Note that this field will be set even after pre-order is fulfilled.
            },
            &quot;purchaseOptionId&quot;: &quot;A String&quot;, # ID of the purchase option. This field is set for both purchase options and variant offers. For purchase options, this ID identifies the purchase option itself. For variant offers, this ID refers to the associated purchase option, and in conjunction with offer_id it identifies the variant offer.
            &quot;quantity&quot;: 42, # The number of items purchased (for multi-quantity item purchases).
            &quot;rentalDetails&quot;: { # Details of a rental purchase. # The details of a rent purchase. Only set if it is a rent purchase.
            },
          },
          &quot;paidAppDetails&quot;: { # Details of a paid app purchase. # Details of a paid app purchase.
          },
          &quot;productId&quot;: &quot;A String&quot;, # The purchased product ID or in-app SKU (for example, &#x27;monthly001&#x27; or &#x27;com.some.thing.inapp1&#x27;).
          &quot;productTitle&quot;: &quot;A String&quot;, # Developer-specified name of the product. Displayed in buyer&#x27;s locale. Example: coins, monthly subscription, etc.
          &quot;subscriptionDetails&quot;: { # Details of a subscription purchase. # Details of a subscription purchase.
            &quot;basePlanId&quot;: &quot;A String&quot;, # The base plan ID of the subscription.
            &quot;offerId&quot;: &quot;A String&quot;, # The offer ID for the current subscription offer.
            &quot;offerPhase&quot;: &quot;A String&quot;, # The pricing phase for the billing period funded by this order.
            &quot;servicePeriodEndTime&quot;: &quot;A String&quot;, # The end of the billing period funded by this order. This is a snapshot of the billing/service period end time at the moment the order was processed, and should be used only for accounting. To get the current end time of the subscription service period, use purchases.subscriptionsv2.get.
            &quot;servicePeriodStartTime&quot;: &quot;A String&quot;, # The start of the billing period funded by this order. This is a snapshot of the billing/service period start time at the moment the order was processed, and should be used only for accounting.
          },
          &quot;tax&quot;: { # Represents an amount of money with its currency type. # The tax paid for this line item.
            &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
            &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
            &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
          },
          &quot;total&quot;: { # Represents an amount of money with its currency type. # The total amount paid by the user for this line item, taking into account discounts and tax.
            &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
            &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
            &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
          },
        },
      ],
      &quot;orderDetails&quot;: { # Detailed information about the order at creation time. # Detailed information about the order at creation time.
        &quot;taxInclusive&quot;: True or False, # Indicates whether the listed price was tax inclusive or not.
      },
      &quot;orderHistory&quot;: { # Details about events which modified the order. # Details about events which modified the order.
        &quot;cancellationEvent&quot;: { # Details of when the order was canceled. # Details of when the order was canceled.
          &quot;eventTime&quot;: &quot;A String&quot;, # The time when the order was canceled.
        },
        &quot;partialRefundEvents&quot;: [ # Details of the partial refund events for this order.
          { # Details of the partial refund events for this order.
            &quot;createTime&quot;: &quot;A String&quot;, # The time when the partial refund was created.
            &quot;processTime&quot;: &quot;A String&quot;, # The time when the partial refund was processed.
            &quot;refundDetails&quot;: { # Details for a partial or full refund. # Details for the partial refund.
              &quot;tax&quot;: { # Represents an amount of money with its currency type. # The amount of tax refunded.
                &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
                &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
                &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
              },
              &quot;total&quot;: { # Represents an amount of money with its currency type. # The total amount refunded, including tax.
                &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
                &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
                &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
              },
            },
            &quot;state&quot;: &quot;A String&quot;, # The state of the partial refund.
          },
        ],
        &quot;processedEvent&quot;: { # Details of when the order was processed. # Details of when the order was processed.
          &quot;eventTime&quot;: &quot;A String&quot;, # The time when the order was processed.
        },
        &quot;refundEvent&quot;: { # Details of when the order was fully refunded. # Details of when the order was fully refunded.
          &quot;eventTime&quot;: &quot;A String&quot;, # The time when the order was fully refunded.
          &quot;refundDetails&quot;: { # Details for a partial or full refund. # Details for the full refund.
            &quot;tax&quot;: { # Represents an amount of money with its currency type. # The amount of tax refunded.
              &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
              &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
              &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
            },
            &quot;total&quot;: { # Represents an amount of money with its currency type. # The total amount refunded, including tax.
              &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
              &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
              &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
            },
          },
          &quot;refundReason&quot;: &quot;A String&quot;, # The reason the order was refunded.
        },
      },
      &quot;orderId&quot;: &quot;A String&quot;, # The order ID.
      &quot;pointsDetails&quot;: { # Details relating to any Play Points applied to an order. # Play points applied to the order, including offer information, discount rate and point values.
        &quot;pointsCouponValue&quot;: { # Represents an amount of money with its currency type. # The monetary value of a Play Points coupon. This is the discount the coupon provides, which may not be the total amount. Only set when Play Points coupons have been used. E.g. for a 100 points for $2 coupon, this is $2.
          &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
          &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
          &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
        },
        &quot;pointsDiscountRateMicros&quot;: &quot;A String&quot;, # The percentage rate which the Play Points promotion reduces the cost by. E.g. for a 100 points for $2 coupon, this is 500,000. Since $2 has an estimate of 200 points, but the actual Points required, 100, is 50% of this, and 50% in micros is 500,000. Between 0 and 1,000,000.
        &quot;pointsOfferId&quot;: &quot;A String&quot;, # ID unique to the play points offer in use for this order.
        &quot;pointsSpent&quot;: &quot;A String&quot;, # The number of Play Points applied in this order. E.g. for a 100 points for $2 coupon, this is 100. For coupon stacked with base offer, this is the total points spent across both.
      },
      &quot;purchaseToken&quot;: &quot;A String&quot;, # The token provided to the user&#x27;s device when the subscription or item was purchased.
      &quot;state&quot;: &quot;A String&quot;, # The state of the order.
      &quot;tax&quot;: { # Represents an amount of money with its currency type. # The total tax paid as a part of this order.
        &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
        &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
        &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
      },
      &quot;total&quot;: { # Represents an amount of money with its currency type. # The final amount paid by the customer, taking into account discounts and taxes.
        &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
        &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
        &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
      },
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="get">get(packageName, orderId, x__xgafv=None)</code>
  <pre>Get order details for a single order.

Args:
  packageName: string, Required. The package name of the application for which this subscription or in-app item was purchased (for example, &#x27;com.some.thing&#x27;). (required)
  orderId: string, Required. The order ID provided to the user when the subscription or in-app order was purchased. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The Order resource encapsulates comprehensive information about a transaction made on Google Play. It includes a variety of attributes that provide details about the order itself, the products purchased, and the history of events related to the order. The Orders APIs provide real-time access to your order data within the Google Play ecosystem. You can retrieve detailed information and metadata for both one-time and recurring orders, including transaction details like charges, taxes, and refunds, as well as metadata such as pricing phases for subscriptions. The Orders APIs let you automate tasks related to order management, reducing the need for manual checks via the Play Developer Console. The following are some of the use cases for this API: + Real-time order data retrieval - Get order details and metadata immediately after a purchase using an order ID. + Order update synchronization - Periodically sync order updates to maintain an up-to-date record of order information. Note: + The Orders API calls count towards your Play Developer API quota, which defaults to 200K daily, and may be insufficient to sync extensive order histories. + A maximum of 1000 orders can be retrieved per call. Using larger page sizes is recommended to minimize quota usage. Check your quota in the Cloud Console and request more if required.
  &quot;buyerAddress&quot;: { # Address information for the customer, for use in tax computation. # Address information for the customer, for use in tax computation. When Google is the Merchant of Record for the order, only country is shown.
    &quot;buyerCountry&quot;: &quot;A String&quot;, # Two letter country code based on ISO-3166-1 Alpha-2 (UN country codes).
    &quot;buyerPostcode&quot;: &quot;A String&quot;, # Postal code of an address. When Google is the Merchant of Record for the order, this information is not included.
    &quot;buyerState&quot;: &quot;A String&quot;, # Top-level administrative subdivision of the buyer address country. When Google is the Merchant of Record for the order, this information is not included.
  },
  &quot;createTime&quot;: &quot;A String&quot;, # The time when the order was created.
  &quot;developerRevenueInBuyerCurrency&quot;: { # Represents an amount of money with its currency type. # Your revenue for this order in the buyer&#x27;s currency, including deductions of partial refunds, taxes and fees. Google deducts standard transaction and third party fees from each sale, including VAT in some regions.
    &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
    &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
    &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
  },
  &quot;lastEventTime&quot;: &quot;A String&quot;, # The time of the last event that occurred on the order.
  &quot;lineItems&quot;: [ # The individual line items making up this order.
    { # Details of a line item.
      &quot;listingPrice&quot;: { # Represents an amount of money with its currency type. # Item&#x27;s listed price on Play Store, this may or may not include tax. Excludes any discounts or promotions.
        &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
        &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
        &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
      },
      &quot;oneTimePurchaseDetails&quot;: { # Details of a one-time purchase. # Details of a one-time purchase.
        &quot;offerId&quot;: &quot;A String&quot;, # The offer ID of the one-time purchase offer.
        &quot;preorderDetails&quot;: { # Details of a pre-order purchase. # The details of a pre-order purchase. Only set if it is a pre-order purchase. Note that this field will be set even after pre-order is fulfilled.
        },
        &quot;purchaseOptionId&quot;: &quot;A String&quot;, # ID of the purchase option. This field is set for both purchase options and variant offers. For purchase options, this ID identifies the purchase option itself. For variant offers, this ID refers to the associated purchase option, and in conjunction with offer_id it identifies the variant offer.
        &quot;quantity&quot;: 42, # The number of items purchased (for multi-quantity item purchases).
        &quot;rentalDetails&quot;: { # Details of a rental purchase. # The details of a rent purchase. Only set if it is a rent purchase.
        },
      },
      &quot;paidAppDetails&quot;: { # Details of a paid app purchase. # Details of a paid app purchase.
      },
      &quot;productId&quot;: &quot;A String&quot;, # The purchased product ID or in-app SKU (for example, &#x27;monthly001&#x27; or &#x27;com.some.thing.inapp1&#x27;).
      &quot;productTitle&quot;: &quot;A String&quot;, # Developer-specified name of the product. Displayed in buyer&#x27;s locale. Example: coins, monthly subscription, etc.
      &quot;subscriptionDetails&quot;: { # Details of a subscription purchase. # Details of a subscription purchase.
        &quot;basePlanId&quot;: &quot;A String&quot;, # The base plan ID of the subscription.
        &quot;offerId&quot;: &quot;A String&quot;, # The offer ID for the current subscription offer.
        &quot;offerPhase&quot;: &quot;A String&quot;, # The pricing phase for the billing period funded by this order.
        &quot;servicePeriodEndTime&quot;: &quot;A String&quot;, # The end of the billing period funded by this order. This is a snapshot of the billing/service period end time at the moment the order was processed, and should be used only for accounting. To get the current end time of the subscription service period, use purchases.subscriptionsv2.get.
        &quot;servicePeriodStartTime&quot;: &quot;A String&quot;, # The start of the billing period funded by this order. This is a snapshot of the billing/service period start time at the moment the order was processed, and should be used only for accounting.
      },
      &quot;tax&quot;: { # Represents an amount of money with its currency type. # The tax paid for this line item.
        &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
        &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
        &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
      },
      &quot;total&quot;: { # Represents an amount of money with its currency type. # The total amount paid by the user for this line item, taking into account discounts and tax.
        &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
        &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
        &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
      },
    },
  ],
  &quot;orderDetails&quot;: { # Detailed information about the order at creation time. # Detailed information about the order at creation time.
    &quot;taxInclusive&quot;: True or False, # Indicates whether the listed price was tax inclusive or not.
  },
  &quot;orderHistory&quot;: { # Details about events which modified the order. # Details about events which modified the order.
    &quot;cancellationEvent&quot;: { # Details of when the order was canceled. # Details of when the order was canceled.
      &quot;eventTime&quot;: &quot;A String&quot;, # The time when the order was canceled.
    },
    &quot;partialRefundEvents&quot;: [ # Details of the partial refund events for this order.
      { # Details of the partial refund events for this order.
        &quot;createTime&quot;: &quot;A String&quot;, # The time when the partial refund was created.
        &quot;processTime&quot;: &quot;A String&quot;, # The time when the partial refund was processed.
        &quot;refundDetails&quot;: { # Details for a partial or full refund. # Details for the partial refund.
          &quot;tax&quot;: { # Represents an amount of money with its currency type. # The amount of tax refunded.
            &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
            &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
            &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
          },
          &quot;total&quot;: { # Represents an amount of money with its currency type. # The total amount refunded, including tax.
            &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
            &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
            &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
          },
        },
        &quot;state&quot;: &quot;A String&quot;, # The state of the partial refund.
      },
    ],
    &quot;processedEvent&quot;: { # Details of when the order was processed. # Details of when the order was processed.
      &quot;eventTime&quot;: &quot;A String&quot;, # The time when the order was processed.
    },
    &quot;refundEvent&quot;: { # Details of when the order was fully refunded. # Details of when the order was fully refunded.
      &quot;eventTime&quot;: &quot;A String&quot;, # The time when the order was fully refunded.
      &quot;refundDetails&quot;: { # Details for a partial or full refund. # Details for the full refund.
        &quot;tax&quot;: { # Represents an amount of money with its currency type. # The amount of tax refunded.
          &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
          &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
          &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
        },
        &quot;total&quot;: { # Represents an amount of money with its currency type. # The total amount refunded, including tax.
          &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
          &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
          &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
        },
      },
      &quot;refundReason&quot;: &quot;A String&quot;, # The reason the order was refunded.
    },
  },
  &quot;orderId&quot;: &quot;A String&quot;, # The order ID.
  &quot;pointsDetails&quot;: { # Details relating to any Play Points applied to an order. # Play points applied to the order, including offer information, discount rate and point values.
    &quot;pointsCouponValue&quot;: { # Represents an amount of money with its currency type. # The monetary value of a Play Points coupon. This is the discount the coupon provides, which may not be the total amount. Only set when Play Points coupons have been used. E.g. for a 100 points for $2 coupon, this is $2.
      &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
      &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
      &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
    },
    &quot;pointsDiscountRateMicros&quot;: &quot;A String&quot;, # The percentage rate which the Play Points promotion reduces the cost by. E.g. for a 100 points for $2 coupon, this is 500,000. Since $2 has an estimate of 200 points, but the actual Points required, 100, is 50% of this, and 50% in micros is 500,000. Between 0 and 1,000,000.
    &quot;pointsOfferId&quot;: &quot;A String&quot;, # ID unique to the play points offer in use for this order.
    &quot;pointsSpent&quot;: &quot;A String&quot;, # The number of Play Points applied in this order. E.g. for a 100 points for $2 coupon, this is 100. For coupon stacked with base offer, this is the total points spent across both.
  },
  &quot;purchaseToken&quot;: &quot;A String&quot;, # The token provided to the user&#x27;s device when the subscription or item was purchased.
  &quot;state&quot;: &quot;A String&quot;, # The state of the order.
  &quot;tax&quot;: { # Represents an amount of money with its currency type. # The total tax paid as a part of this order.
    &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
    &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
    &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
  },
  &quot;total&quot;: { # Represents an amount of money with its currency type. # The final amount paid by the customer, taking into account discounts and taxes.
    &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
    &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
    &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="refund">refund(packageName, orderId, revoke=None, x__xgafv=None)</code>
  <pre>Refunds a user&#x27;s subscription or in-app purchase order. Orders older than 3 years cannot be refunded.

Args:
  packageName: string, The package name of the application for which this subscription or in-app item was purchased (for example, &#x27;com.some.thing&#x27;). (required)
  orderId: string, The order ID provided to the user when the subscription or in-app order was purchased. (required)
  revoke: boolean, Whether to revoke the purchased item. If set to true, access to the subscription or in-app item will be terminated immediately. If the item is a recurring subscription, all future payments will also be terminated. Consumed in-app items need to be handled by developer&#x27;s app. (optional).
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
</pre>
</div>

</body></html>